package com.siwei.mes.mapper.laboratory;

import com.siwei.mes.common.dataSource.DataSource;
import com.siwei.mes.common.dataSource.DataSourceNames;
import com.siwei.mes.entity.laboratory.CustomData;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 协会 custom_info 表
 *
 * @Description: 协会 custom_info 表
 * @Version: 1.0
 * @author: mlchen
 * @date: 2024/7/26 09:28
 */
public interface CustomInfoMapper {
    /**
     * 新增客户
     *
     * @param customData
     * @return
     */
    @DataSource(DataSourceNames.LABORATORY)
    void insert(CustomData customData);

    @DataSource(DataSourceNames.LABORATORY)
    void updateByPrimaryKeySelective(CustomData customData);

    @DataSource(DataSourceNames.LABORATORY)
    void updateByPrimaryKey(CustomData customData);

    /**
     * 根据客户名称查询数据
     *
     * @param customerName
     * @return
     */
    @DataSource(DataSourceNames.LABORATORY)
    CustomData selectByCustomerName(@Param("customerName") String customerName);

    /**
     * 获取所有协会的客户
     *
     * @return
     */
    @DataSource(DataSourceNames.LABORATORY)
    List<CustomData> getAll();
}
